From 87fe872ace1a915a4f8286baf77a01e917a1130b Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Fri, 4 Feb 2005 09:26:26 +0000 Subject: [PATCH] bitkeeper revision 1.1159.212.84 (42033fc2Q0eAAtQcKyCf8cXCt_Fgfg) Common-code cleanups, for ia64. Signed-off-by: keir.fraser@cl.cam.ac.uk --- .rootkeys | 1 + xen/arch/x86/dom0_ops.c | 38 ++++++++++++++++++++++++++++++++ xen/common/Makefile | 1 + xen/common/dom0_ops.c | 38 -------------------------------- xen/drivers/char/console.c | 2 +- xen/drivers/char/serial.c | 2 ++ xen/include/asm-x86/config.h | 2 ++ xen/include/asm-x86/time.h | 7 ++++++ xen/include/public/arch-x86_32.h | 3 +++ xen/include/public/arch-x86_64.h | 3 +++ xen/include/public/xen.h | 9 ++++---- xen/include/xen/keyhandler.h | 2 +- xen/include/xen/time.h | 1 + 13 files changed, 65 insertions(+), 44 deletions(-) create mode 100644 xen/include/asm-x86/time.h diff --git a/.rootkeys b/.rootkeys index d2a1df79ea..f331481b60 100644 --- a/.rootkeys +++ b/.rootkeys @@ -1032,6 +1032,7 @@ 3ddb79c3NiyQE2vQnyGiaBnNjBO1rA xen/include/asm-x86/spinlock.h 40e1966akOHWvvunCED7x3HPv35QvQ xen/include/asm-x86/string.h 3ddb79c3ezddh34MdelJpa5tNR00Dw xen/include/asm-x86/system.h +42033fc1Bb8ffTshBYFGouGkiAMoUQ xen/include/asm-x86/time.h 3ddb79c4HugMq7IYGxcQKFBpKwKhzA xen/include/asm-x86/types.h 40cf1596saFaHD5DC5zvrSn7CDCWGQ xen/include/asm-x86/uaccess.h 41c0c412k6GHYF3cJtDdw37ee3TVaw xen/include/asm-x86/vmx.h diff --git a/xen/arch/x86/dom0_ops.c b/xen/arch/x86/dom0_ops.c index 99278ff8cf..c173d043a2 100644 --- a/xen/arch/x86/dom0_ops.c +++ b/xen/arch/x86/dom0_ops.c @@ -295,6 +295,44 @@ long arch_do_dom0_op(dom0_op_t *op, dom0_op_t *u_dom0_op) } break; + case DOM0_GETMEMLIST: + { + int i; + struct domain *d = find_domain_by_id(op->u.getmemlist.domain); + unsigned long max_pfns = op->u.getmemlist.max_pfns; + unsigned long pfn; + unsigned long *buffer = op->u.getmemlist.buffer; + struct list_head *list_ent; + + ret = -EINVAL; + if ( d != NULL ) + { + ret = 0; + + spin_lock(&d->page_alloc_lock); + list_ent = d->page_list.next; + for ( i = 0; (i < max_pfns) && (list_ent != &d->page_list); i++ ) + { + pfn = list_entry(list_ent, struct pfn_info, list) - + frame_table; + if ( put_user(pfn, buffer) ) + { + ret = -EFAULT; + break; + } + buffer++; + list_ent = frame_table[pfn].list.next; + } + spin_unlock(&d->page_alloc_lock); + + op->u.getmemlist.num_pfns = i; + copy_to_user(u_dom0_op, op, sizeof(*op)); + + put_domain(d); + } + } + break; + default: ret = -ENOSYS; diff --git a/xen/common/Makefile b/xen/common/Makefile index 9e683841a2..17b3b952e7 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -5,6 +5,7 @@ ifeq ($(TARGET_ARCH),ia64) OBJS := $(subst dom_mem_ops.o,,$(OBJS)) OBJS := $(subst grant_table.o,,$(OBJS)) OBJS := $(subst page_alloc.o,,$(OBJS)) +OBJS := $(subst physdev.o,,$(OBJS)) OBJS := $(subst slab.o,,$(OBJS)) endif diff --git a/xen/common/dom0_ops.c b/xen/common/dom0_ops.c index 4611d1f2fe..be3e41769a 100644 --- a/xen/common/dom0_ops.c +++ b/xen/common/dom0_ops.c @@ -291,44 +291,6 @@ long do_dom0_op(dom0_op_t *u_dom0_op) } break; - case DOM0_GETMEMLIST: - { - int i; - struct domain *d = find_domain_by_id(op->u.getmemlist.domain); - unsigned long max_pfns = op->u.getmemlist.max_pfns; - unsigned long pfn; - unsigned long *buffer = op->u.getmemlist.buffer; - struct list_head *list_ent; - - ret = -EINVAL; - if ( d != NULL ) - { - ret = 0; - - spin_lock(&d->page_alloc_lock); - list_ent = d->page_list.next; - for ( i = 0; (i < max_pfns) && (list_ent != &d->page_list); i++ ) - { - pfn = list_entry(list_ent, struct pfn_info, list) - - frame_table; - if ( put_user(pfn, buffer) ) - { - ret = -EFAULT; - break; - } - buffer++; - list_ent = frame_table[pfn].list.next; - } - spin_unlock(&d->page_alloc_lock); - - op->u.getmemlist.num_pfns = i; - copy_to_user(u_dom0_op, op, sizeof(*op)); - - put_domain(d); - } - } - break; - case DOM0_GETDOMAININFO: { full_execution_context_t *c; diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c index 336b1430bc..5494db499c 100644 --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -21,7 +21,7 @@ #include /* opt_console: comma-separated list of console outputs. */ -static unsigned char opt_console[30] = "com1,vga"; +static unsigned char opt_console[30] = OPT_CONSOLE_STR; string_param("console", opt_console); /* opt_conswitch: a character pair controlling console switching. */ diff --git a/xen/drivers/char/serial.c b/xen/drivers/char/serial.c index 2c6fc895b4..b085c7400e 100644 --- a/xen/drivers/char/serial.c +++ b/xen/drivers/char/serial.c @@ -331,11 +331,13 @@ int parse_serial_handle(char *conf) goto fail; } +#ifndef NO_UART_CONFIG_OK if ( !UART_ENABLED(&com[handle]) ) { printk("ERROR: cannot use unconfigured serial port COM%d\n", handle+1); return -1; } +#endif if ( conf[4] == 'H' ) handle |= SERHND_HI; diff --git a/xen/include/asm-x86/config.h b/xen/include/asm-x86/config.h index 959b25d1b0..5080fd621d 100644 --- a/xen/include/asm-x86/config.h +++ b/xen/include/asm-x86/config.h @@ -52,6 +52,8 @@ #define HZ 100 +#define OPT_CONSOLE_STR "com1,vga" + /* * Just to keep compiler happy. * NB. DO NOT CHANGE SMP_CACHE_BYTES WITHOUT FIXING arch/i386/entry.S!!! diff --git a/xen/include/asm-x86/time.h b/xen/include/asm-x86/time.h new file mode 100644 index 0000000000..2256145bec --- /dev/null +++ b/xen/include/asm-x86/time.h @@ -0,0 +1,7 @@ + +#ifndef __X86_TIME_H__ +#define __X86_TIME_H__ + +/* nothing */ + +#endif /* __X86_TIME_H__ */ diff --git a/xen/include/public/arch-x86_32.h b/xen/include/public/arch-x86_32.h index 39e770b894..68fa7c570c 100644 --- a/xen/include/public/arch-x86_32.h +++ b/xen/include/public/arch-x86_32.h @@ -141,6 +141,9 @@ typedef struct { u64 pfn_to_mfn_frame_list; } PACKED arch_shared_info_t; +typedef struct { +} PACKED arch_vcpu_info_t; + #define ARCH_HAS_FAST_TRAP #endif diff --git a/xen/include/public/arch-x86_64.h b/xen/include/public/arch-x86_64.h index 6db6faa5c0..f320a4ca7b 100644 --- a/xen/include/public/arch-x86_64.h +++ b/xen/include/public/arch-x86_64.h @@ -148,6 +148,9 @@ typedef struct { u64 pfn_to_mfn_frame_list; } PACKED arch_shared_info_t; +typedef struct { +} PACKED arch_vcpu_info_t; + #endif /* !__ASSEMBLY__ */ #endif diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h index 48af2d9810..ac643140c4 100644 --- a/xen/include/public/xen.h +++ b/xen/include/public/xen.h @@ -257,7 +257,7 @@ typedef struct * Per-VCPU information goes here. This will be cleaned up more when Xen * actually supports multi-VCPU guests. */ -typedef struct vcpu_info_st +typedef struct { /* * 'evtchn_upcall_pending' is written non-zero by Xen to indicate @@ -284,11 +284,12 @@ typedef struct vcpu_info_st * an upcall activation. The mask is cleared when the VCPU requests * to block: this avoids wakeup-waiting races. */ - u8 evtchn_upcall_pending; - u8 evtchn_upcall_mask; + u8 evtchn_upcall_pending; /* 0 */ + u8 evtchn_upcall_mask; /* 1 */ u8 pad0, pad1; u32 evtchn_pending_sel; /* 4 */ -} PACKED vcpu_info_t; /* 8 */ + arch_vcpu_info_t arch; /* 8 */ +} PACKED vcpu_info_t; /* 8 + arch */ /* * Xen/guestos shared data -- pointer provided in start_info. diff --git a/xen/include/xen/keyhandler.h b/xen/include/xen/keyhandler.h index 3c7c36ef66..e3d49c9086 100644 --- a/xen/include/xen/keyhandler.h +++ b/xen/include/xen/keyhandler.h @@ -10,7 +10,7 @@ #ifndef __XEN_KEYHANDLER_H__ #define __XEN_KEYHANDLER_H__ -struct xen_regs; +#include /* * Register a callback function for key @key. The callback occurs in diff --git a/xen/include/xen/time.h b/xen/include/xen/time.h index 3c6d57a87b..be8becffa1 100644 --- a/xen/include/xen/time.h +++ b/xen/include/xen/time.h @@ -29,6 +29,7 @@ #include #include +#include extern int init_xen_time(); -- 2.30.2